#!/usr/bin/python3
'''
这个是日志文件
'''
import datetime
import os
def cloud_print(log):
    print(log)
    folder_path = './log'
    if not os.path.exists(folder_path):  #判断是否存在文件夹如果不存在则创建为文件夹
        os.mkdir(folder_path)
    file_path = folder_path + '/' + datetime.datetime.now().strftime('%Y-%m-%d') + '.log'
    with open(file_path, 'a') as f: 
        f.write(log+'\n')